package com.woke.data;

import android.text.TextUtils;

import java.io.Serializable;

/**
 * 作者 ： 暗网
 * 创建时间：2017/3/12
 * 备注：   银联支付渠道
 */

public class UnionPayChannel implements Serializable{
    private int id;
    private int way;    //  通道id？
    private int type;  //类型（0收款/1支付）
    private int kind; //种类(1微信 2支付宝 3银联)
    private String icon;          //图标
    private String title;          //标题
    private String describe;      //描述
    private String thirdPayment;  //第三方支付
    private int status;           //状态--1启用，0禁用
    private int addTime;
    private int updateTime;
    private int enable;      //该字段为商家已开通收款码通道标识  1开通 0未开通
    //入驻列表 需要使用到这两个字段
    private int settled;     //0未入驻  1审核中  2已入驻
    private String settled_info;//settled 对应备注说明
    private String name;        //通道英文名称(用于查找通道) 如guangzhoupufa,huika,minsheng
    private int payway;       //(1微信 2支付宝 3银联)



    private String controller;      //




    private int minamount;        //最小额度



    private int maxamount;       //最大额度


    private String paymentdate;       //0是t0,1是t1,2是d0,3是d1


    private String message;       // 卡到卡

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public int getMaxamount() {
        return maxamount;
    }

    public void setMaxamount(int maxamount) {
        this.maxamount = maxamount;
    }
    public int getMinamount() {
        return minamount;
    }

    public void setMinamount(int minamount) {
        this.minamount = minamount;
    }
    public String getPaymentdate() {
        return paymentdate;
    }

    public void setPaymentdate(String paymentdate) {
        this.paymentdate = paymentdate;
    }



    public String getController() {
        return controller;
    }

    public void setController(String controller) {
        this.controller = controller;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getWay() {
        return way;
    }

    public void setWay(int way) {
        this.way = way;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public int getKind() {
        return kind;
    }

    public void setKind(int kind) {
        this.kind = kind;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDescribe() {
        return describe;
    }

    public void setDescribe(String describe) {
        this.describe = describe;
    }

    public String getThirdPayment() {
        return thirdPayment;
    }

    public void setThirdPayment(String thirdPayment) {
        this.thirdPayment = thirdPayment;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public int getAddTime() {
        return addTime;
    }

    public void setAddTime(int addTime) {
        this.addTime = addTime;
    }

    public int getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(int updateTime) {
        this.updateTime = updateTime;
    }

    public int getEnable() {
        return enable;
    }

    public void setEnable(int enable) {
        this.enable = enable;
    }

    public boolean isEnable() {
        return enable == 1;
    }

    public int getSettled() {
        return settled;
    }

    public void setSettled(int settled) {
        this.settled = settled;
    }

    public String getSettled_info() {
        return settled_info;
    }

    public void setSettled_info(String settled_info) {
        this.settled_info = settled_info;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setEnableActivate(boolean isActivate) {
        if (isActivate) {
            enable = 1;
        } else {
            enable = 0;
        }
    }

    /**
     * 是否已经入驻
     *
     * @return
     */
    public boolean isApprove() {
        return settled == 2;
    }

    public boolean isGuangZhouPuFa() {
        return !TextUtils.isEmpty(name) && "guangzhoupufa".equals(name);
    }

    public boolean isMinSheng() {
        return !TextUtils.isEmpty(name) && "minsheng".equals(name);
    }

    public boolean isHuiKa() {
        return !TextUtils.isEmpty(name) && "huika".equals(name);
    }


    public int getPayway() {
        return payway;
    }

    public void setPayway(int payway) {
        this.payway = payway;
    }

    @Override
    public String toString() {
        return "UnionPayChannel{" +
                "id=" + id +
                ", way=" + way +
                ", type=" + type +
                ", kind=" + kind +
                ", icon='" + icon + '\'' +
                ", title='" + title + '\'' +
                ", describe='" + describe + '\'' +
                ", thirdPayment='" + thirdPayment + '\'' +
                ", status=" + status +
                ", addTime=" + addTime +
                ", updateTime=" + updateTime +
                ", enable=" + enable +
                ", settled=" + settled +
                ", settled_info='" + settled_info + '\'' +
                ", name='" + name + '\'' +
                ", payway=" + payway +
                ", controller='" + controller + '\'' +
                '}';
    }
}
